home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
cmln0385.arc
/
MATMAN.DEF
< prev
next >
Wrap
Text File
|
1986-02-27
|
2KB
|
62 lines
Listing 1. The definition part of module MatMan.
DEFINITION MODULE MatMan;
(* Implementation module for matrix management *)
EXPORT QUALIFIED HIROW, Loc, Loc0, LOC, LOC0, SwapColumn, SwapRow,
Transpose, InsertColumn, InsertRow, ResizeMat,
DeleteRow, DeleteColumn;
VAR HIROW : CARDINAL;
PROCEDURE Loc( Row, Col : CARDINAL): CARDINAL;
(* Procedure to locate the (i,j) matrix element, with a default *)
(* HIROW number of rows. *)
PROCEDURE Loc0( Row, Col : CARDINAL): CARDINAL;
(* Procedure to locate the (i,j) matrix element, with a default *)
(* HIROW number of rows. Used in subroutines with open arrays. *)
èPROCEDURE LOC( Row, Col, MaxRow : CARDINAL): CARDINAL;
(* Procedure to locate the (i,j) matrix element, with an assigned *)
(* MaxRow number of rows. *)
PROCEDURE LOC0( Row, Col, MaxRow : CARDINAL): CARDINAL;
(* Procedure to locate the (i,j) matrix element, with an assigned *)
(* MaxRow number of rows. Used in subroutines with open arrays. *)
PROCEDURE SwapColumn(VAR X : ARRAY OF REAL; Col1, Col2, HiRow : CARDINAL);
(* Procedure to swap two columns, Col1 and Col2 *)
PROCEDURE SwapRow(VAR X : ARRAY OF REAL; Row1, Row2, HiRow, HiCol : CARDINAL);
(* Procedure to swap two rows, Row1 and Row2 *)
PROCEDURE Transpose(VAR X, Y : ARRAY OF REAL; HiRow, HiCol : CARDINAL);
(* Procedure to transpose matrix X into matrix Y *)
PROCEDURE InsertColumn(VAR X, Y : ARRAY OF REAL; NewCol : CARDINAL;
VAR HiRow, HiCol : CARDINAL);
(* Procedure to insert a new column Y at colum NewCol in matrix X *)
PROCEDURE InsertRow(VAR X, Y : ARRAY OF REAL; NewRow : CARDINAL;
VAR HiRow, HiCol : CARDINAL);
(* Procedure to insert a new row Y at row NewRow in matrix X *)
PROCEDURE ResizeMat(VAR X : ARRAY OF REAL;
OldHiRow, NewHiRow, HiCol: CARDINAL);
(* Procedure to resize matrix X by reassigning the number of rows *)
PROCEDURE DeleteColumn(VAR X : ARRAY OF REAL; Col, HiRow : CARDINAL;
VAR HiCol : CARDINAL);
(* Procedure to remove column Col from matrix X *)
PROCEDURE DeleteRow(VAR X : ARRAY OF REAL; Row, HiCol : CARDINAL;
VAR HiRow : CARDINAL);
(* Procedure to remove row 'Row' from matrix X *)
END MatMan.